using Microsft.EntiyFrameWorkCore;
namespace Admin2025.Api.Model;

public class AdminDbContext : DbContext
{
    public AdminDbContext(DbContextOptions<AdminDbContext> options) : base(options) { }

public DbSet<Blogs> Blogs { get; set; }
public DbSet<Comments> Comments { get; set; }
    protected override void Onconfiguring(DbcontextOptionsBuilder dbcontextOptionsBuilder)
    {
        var connectionString = "server=localhost;database=admin1;uid=root,pwd=123456";
        optionsBuilder.UseMysql(connectionString, ServerVersion.AutoDetect(connctionString));
    }
}